Skip to content

[GR-67626] Fast-path for builtin reads and get/set attribute operations.#982

Open
graalvmbot wants to merge 4 commits into
masterfrom
ss/opt-builtin-reads-and-attr-getset
Open

[GR-67626] Fast-path for builtin reads and get/set attribute operations.#982
graalvmbot wants to merge 4 commits into
masterfrom
ss/opt-builtin-reads-and-attr-getset

Conversation

@graalvmbot

Copy link
Copy Markdown
Collaborator

No description provided.

@oracle-contributor-agreement oracle-contributor-agreement Bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jun 23, 2026
@graalvmbot graalvmbot force-pushed the ss/opt-builtin-reads-and-attr-getset branch 3 times, most recently from c4b29b4 to d439d53 Compare June 24, 2026 08:40
@graalvmbot graalvmbot force-pushed the ss/opt-builtin-reads-and-attr-getset branch from d439d53 to 73a9cec Compare June 24, 2026 09:40
…ransition to cached.

Traceback collection counted frames during exception unwinding, but did not
mark them as escaped. In uncached execution, we had the PFrame.Reference links
unconditionally, so this worked when it happened then, and we marked the root
as needing the PFrame.Reference link, so on later cached calls we have them.
But if we raise and escape the frame for the very first time when already
cached we did not preserve the f_back chain and could not reconstruct it
properly later.

This change makes the frames that belong to a traceback mark their current
PFrame.Reference as escaped while the exception is unwinding and the
VirtualFrame is thus still on the stack. The CalleeContext#exit logic then
materializes the frame and propagates to caller frames and this preserves the
f_back chain.

This can be triggered by forcing immediately cached execution, but a regression
test covers the case where functions first transition to cached execution
without raising, then later raises after some time (presumably after we
transitioned to cached) and inspect traceback backrefs.
@graalvmbot graalvmbot force-pushed the ss/opt-builtin-reads-and-attr-getset branch from 47661af to 88a5489 Compare June 25, 2026 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants